﻿using RestApp.UI.App_Start;
using RestApp.UI.Core;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;

namespace RestApp.UI
{
    public class MvcApplication : System.Web.HttpApplication
    {
        protected void Application_Start()
        {
            System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("ru-RU");
            GlobalConfiguration.Configure(WebApiConfig.Register);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
			AutoMapperConfig.Configure();
            BundleConfig.RegisterBundles(BundleTable.Bundles);

			ModelBinders.Binders.Add(typeof(DateTime), new DateTimeBinder());
			ModelBinders.Binders.Add(typeof(DateTime?), new DateTimeBinder());
        }
    }
}
